loadAd

fun loadAd(adRequest: AdRequest, listener: SliderAdLoadListener)

Start loading the slider ad on a background thread.

Parameters

adRequest

an AdRequest object contains targeting information used to fetch a slider ad.

listener

SliderAdLoadListener to be invoked when the ad is loaded or loading fails.


suspend fun loadAd(adRequest: AdRequest): <Error class: unknown class>

Start loading the slider ad on a background thread.

Return

SliderAdLoadResult.Success with SliderAd or SliderAdLoadResult.Failure with com.yandex.mobile.ads.common.AdRequestError.

Parameters

adRequest

an AdRequest object contains targeting information used to fetch a slider ad.


fun loadAd(adRequest: AdRequest, options: NativeAdOptions, listener: SliderAdLoadListener)

Start loading the slider ad on a background thread.

Parameters

adRequest

an AdRequest object contains targeting information used to fetch a slider ad.

options

Configuration options for native ad loading. Default options load images automatically.

listener

SliderAdLoadListener to be invoked when the ad is loaded or loading fails.


suspend fun loadAd(adRequest: AdRequest, options: NativeAdOptions): <Error class: unknown class>

Start loading the slider ad on a background thread.

Return

SliderAdLoadResult.Success with SliderAd or SliderAdLoadResult.Failure with com.yandex.mobile.ads.common.AdRequestError.

Parameters

adRequest

an AdRequest object contains targeting information used to fetch a slider ad.

options

Configuration options for native ad loading. Default options load images automatically.


fun loadAd(adUnitId: String, readyResponse: String, listener: SliderAdLoadListener)

Start loading the slider ad on a background thread with ready response.

Parameters

adUnitId

The AdUnit ID is a unique identifier in the R-M-XXXXXX-Y format, which is assigned in the Partner interface.

readyResponse

Encoded response for ad request.

listener

SliderAdLoadListener to be invoked when the ad is loaded or loading fails.


suspend fun loadAd(adUnitId: String, readyResponse: String): <Error class: unknown class>

Start loading the slider ad on a background thread with ready response.

Return

SliderAdLoadResult.Success with SliderAd or SliderAdLoadResult.Failure with com.yandex.mobile.ads.common.AdRequestError.

Parameters

adUnitId

The AdUnit ID is a unique identifier in the R-M-XXXXXX-Y format, which is assigned in the Partner interface.

readyResponse

Encoded response for ad request.


fun loadAd(adUnitId: String, readyResponse: String, options: NativeAdOptions, listener: SliderAdLoadListener)

Start loading the slider ad on a background thread with ready response.

Parameters

adUnitId

The AdUnit ID is a unique identifier in the R-M-XXXXXX-Y format, which is assigned in the Partner interface.

readyResponse

Encoded response for ad request.

options

Configuration options for native ad loading. Default options load images automatically.

listener

SliderAdLoadListener to be invoked when the ad is loaded or loading fails.


suspend fun loadAd(adUnitId: String, readyResponse: String, options: NativeAdOptions): <Error class: unknown class>

Start loading the slider ad on a background thread with ready response.

Return

SliderAdLoadResult.Success with SliderAd or SliderAdLoadResult.Failure with com.yandex.mobile.ads.common.AdRequestError.

Parameters

adUnitId

The AdUnit ID is a unique identifier in the R-M-XXXXXX-Y format, which is assigned in the Partner interface.

readyResponse

Encoded response for ad request.

options

Configuration options for native ad loading. Default options load images automatically.